﻿@using UcAsp.Net.Comm;
@model UcAsp.Net.Model.SiteSetting
@{
    ViewBag.Title = "网站基本设置";
    Layout = "~/Views/Shared/_AdminLayOut.cshtml";
    ;
}
<script type="text/javascript">

    tinymce.init({
        selector: "textarea",
        plugins: [
        "advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste hr upfile"
    ],
        toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent |link image upfile"

    });
    $(document).ready(function () {
        $("#savesiteseting").click(function () {
            $.post("/Admin/SaveSetSetting", { SiteName: $("input[name='SiteName']").val(), SiteDescription: $("input[name='SiteDescription']").val(), SiteUrl: $("input[name='SiteUrl']").val(), PointsRate: $("input[name='PointsRate']").val(), MasterHeader: $("input[name='MasterHeader']").val(), UserHeader: $("input[name='UserHeader']").val(), SearchMetaKeywords: $("input[name='SearchMetaKeywords']").val(), SearchMetaDescription: $("input[name='SearchMetaDescription']").val(), Footer: tinyMCE.get("Footer").getContent(), Copyright: tinyMCE.get("Copyright").getContent() }, function () {
                alert("内容已更新");
            })
        })
    })

</script>

<div class="container-fluid">
<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>									
								</span>
								<h5>基本设置</h5>
							</div>
                            <div class="widget-content nopadding">
                                    <form action="#" method="post" class="form-horizontal" >                 
                                                
                                                 <div class="control-group">
										            <label class="control-label">网站名称</label>
										            <div class="controls">
											           <input class="text-input small-input" type="text" name="SiteName"  value="@Model.SiteName" />
										            </div>
									            </div>

                                                <div class="control-group">
                                                  <label  class="control-label">网站介绍</label>
                                                  <div class="controls">
                                                     <input class="text-input large-input" type="text" name="SiteDescription" value="@Model.SiteDescription" />
                                                    </div>
                                                 </div>
                                                <div class="control-group">
                                                  <label class="control-label">网站地址</label>
                                                  <div class="controls">
                                                     <input class="text-input small-input" type="text"  name="SiteUrl" value="@Model.SiteUrl" />
                                                     </div>
                                                 </div>
                                                <div class="control-group">
                                                  <label class="control-label">注册送积分</label>
                                                  <div class="controls">
                                                     <input class="text-input small-input" type="text" name="PointsRate" value="@Model.PointsRate" />
                                                </div>
                                                </div>
                                                    <div class="control-group">
                                                  <label class="control-label">管理员默认头像</label>
                                                  <div class="controls">
                                                     <input class="text-input small-input" type="text" name="MasterHeader" value="@Model.MasterHeader" />
                                                    </div>
                                                 </div>
                                         <div class="control-group">
                                                  <label class="control-label">用户默认头像</label>
                                                  <div class="controls">
                                                     <input class="text-input small-input" type="text" name="UserHeader" value="@Model.UserHeader" />
                                                  </div>
                                               </div>
                                               <div class="control-group">
                                                  <label class="control-label">网站关键词</label>
                                                  <div class="controls">
                                                     <input class="text-input large-input" type="text"  name="SearchMetaKeywords" value="@Model.SearchMetaKeywords" />
                                                    </div>
                                                </div>
                                               <div class="control-group">
                                                  <label class="control-label">网站描述</label>
                                                  <div class="controls">
                                                     <input class="text-input large-input" type="text" name="SearchMetaDescription" value="@Model.SearchMetaDescription" />
                                                </div>
                                                 </div>

                                                <div class="control-group">
                                                  <label class="control-label">友情链接</label>
                                                  <div class="controls">
                                                  <textarea class="text-input textarea wysiwyg"  name="Footer" cols="79" rows="15">@Model.Footer</textarea>
                                                </div>
                                              </div>
                                               <div class="control-group">
                                                  <label class="control-label">网站版权</label>
                                                  <div class="controls">
                                                  <textarea class="text-input textarea wysiwyg"  name="Copyright" cols="79" rows="15">@Model.Copyright</textarea>
                                                  </div>
                                                </div>
                                                  <div class="control-group">
                                                  <div class="controls">
                                                         <sapn class="btn btn-warning" id="savesiteseting"><i class="icon-ok icon-white"></i> 保 存 </sapn>
                                                        </div>
                                                </div>
            
                                                <div class="clear"></div>
                                                <!-- End .clear -->
                                              </form>
                                            </div>
                                           </div>
                                   </div>
                              </div>
                                              
</div>